package Eyjafjalla.card.skill;

import Eyjafjalla.action.RecitativeAction;
import Eyjafjalla.card.AbstractEyjafjallaCard;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;

public class SadnessRecitative_Eyjafjalla extends AbstractEyjafjallaCard {
    public static final String ID = "SadnessRecitative_Eyjafjalla";
    private static final CardStrings cardStrings;

    public SadnessRecitative_Eyjafjalla(){
        super(ID, cardStrings.NAME,0,cardStrings.DESCRIPTION,CardType.SKILL,CardRarity.UNCOMMON,CardTarget.SELF);
        this.baseBlock = 6;
        this.block = 6;
        this.baseMagicNumber = 3;
        this.magicNumber = 3;
        setFireDescription(cardStrings.EXTENDED_DESCRIPTION[0]);
    }

    @Override
    public AbstractCard makeCopy() {
        return new SadnessRecitative_Eyjafjalla();
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        addToBot(new RecitativeAction(p,this.magicNumber,this.block));
    }

    @Override
    public void applyPowers() {
        int trueM = baseMagicNumber;
        if(isFire()){
            baseMagicNumber+=2;
        }
        magicNumber = baseMagicNumber;
        baseMagicNumber = trueM;
        isMagicNumberModified = baseMagicNumber!=magicNumber;
        super.applyPowers();
    }

    @Override
    public void upgrade() {
        if(!this.upgraded){
            upgradeName();
            upgradeBlock(2);
        }
    }

    static {
        cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
    }
}



